package com.tsd.core.openweixin.model.message;


import com.tsd.core.openweixin.utils.AdapterCDATA;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

/**
 * @author wudw
 */
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class ImageMessage extends WeixinMessage {

    @XmlElement(name = "PicUrl")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String picUrl;
    @XmlElement(name = "MediaId")
    @XmlJavaTypeAdapter(AdapterCDATA.class)
    private String mediaId;

    public ImageMessage() {
        super();
        msgType = WeixinMessageType.IMAGE;
    }

    public String getPicUrl() {
        return picUrl;
    }


    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }


    public String getMediaId() {
        return mediaId;
    }


    public void setMediaId(String mediaId) {
        this.mediaId = mediaId;
    }


    @Override
    public String toString() {
        return "ImageMessage{" + "picUrl=" + picUrl + ",mediaId=" + mediaId + '}';
    }

}
